<template>
        <div v-show="skeleton">
<van-skeleton title :row="13" />
    </div>
  <div v-show="!skeleton">
    <van-nav-bar title="详情" left-text="返回" left-arrow @click-left="() => { $router.push('/') }" fixed />
    <div style="height: 45px;"></div>
   <Swipe></Swipe>

<div v-html="detailApiData.goods_introduce"></div>
    </div>
      <van-submit-bar :price="99900" button-text="提交订单" @submit="onSubmit">
<van-icon name="balance-list-o" badge="99+" size="3rem" />

</van-submit-bar>
</template>

<script setup>
import { ref } from 'vue';
import Swipe from '@/components/Swipe.vue';
import { useRoute,useRouter } from 'vue-router';
const route=useRoute()
const router=useRouter()
const detailApiData=ref([])
console.log(route.params.goods_id);
import { detailApi } from '@/api/api';
detailApi(route.params.goods_id).then(res=>{
    console.log(res);
    detailApiData.value=res.data.message
})
const skeleton=ref(true)
setTimeout(() => {
    skeleton.value=false
}, 1000)

const onSubmit=()=>{
router.push('/home/getOrder')
}
</script>

<style lang="scss" scoped>

</style>